package com.mc.service.impl;

import com.mc.bean.Score;
import com.mc.dao.Impl.ScoreDaoImpl;
import com.mc.dao.ScoreDao;
import com.mc.service.ScoreService;

import java.util.List;

/**
 * @author zl
 * 成绩业务逻辑实现类
 */
public class ScoreServiceImpl implements ScoreService {

    ScoreDao scoreDao = new ScoreDaoImpl();

    @Override
    public List<Score> findByMatchCode(int matchcode) {
        return scoreDao.findByMatchCode(matchcode);
    }

    @Override
    public List<Score> findByMJCode(int mjcode) {
        return scoreDao.findByMJCode(mjcode);
    }

    @Override
    public boolean add(Score score) {
        return scoreDao.add(score)>0?true:false;
    }

    @Override
    public boolean update(Score score) {
        return scoreDao.update(score)>0?true:false;
    }

    @Override
    public Score findByMatchCodeMJCode(int matchcode, int mjcode) {
        return scoreDao.findByMatchCodeMJCode(matchcode,mjcode);
    }
}
